<script setup lang="ts">
import { useAppStore } from '@/stores/app'

const appStore = useAppStore()
</script>

<template>
  <div v-if="appStore.clearVisible" class="absolute top-0 left-0 z-50 w-screen h-screen flex">
    <div class="w-72 m-auto shadow-lg" role="dialog">
      <div class="relative rounded bg-white p-4">
        <div class="mb-4 text-sm">确认清除已中奖人数数据吗？</div>
        <div class="flex justify-end">
          <button
            class="border border-gray-500 rounded px-2 py-1 flex items-center"
            @click="appStore.closeClear"
          >
            <span class="text-xs">取消</span>
          </button>
          <button
            class="rounded bg-red-500 hover:bg-red-400 active:bg-red-500 px-2 py-1 ml-2 flex items-center"
            @click="appStore.clear"
          >
            <span class="text-xs text-white">确认</span>
          </button>
        </div>
      </div>
    </div>
  </div>
</template>
